import { withAuth } from 'next-auth/middleware';

export default withAuth(
  function middleware(req) {
    // 这里可以添加额外的中间件逻辑
  },
  {
    callbacks: {
      authorized: ({ token }) => !!token,
    },
  }
);

export const config = {
  matcher: [
    '/prompts/:path*',
    '/api/prompts/:path*',
    '/api/tags/:path*',
    '/api/upload/:path*',
  ],
};